package com.project.dao;

import com.project.entity.Department;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 12:42
 * @param:
 * @return:
 */
public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);

    /**
     * author: WheelChen
     * date: 2017/7/25
     * function: 学院id查找批量查找系
     *
     * @param schoolId 学院id
     * @return
     */
    List<Department> selectBySchoolId(Integer schoolId);

    /**
     * author: WheelChen
     * date: 2017/8/3
     * function: 根据学院id查找学院下的系-专业-班级
     *
     * @param schoolId
     * @return
     */
    List<Department> selectDetailBatch(Integer schoolId);

    /**
     * author: WheelChen
     * date: 2017/8/10
     * function: 检查系是否已存在
     *
     * @param department
     * @return 0 - 不存在 大于0存在
     */
    int checkMajorIsExist(Department department);

    /**
     * author: WheelChen
     * date: 2017/10/9
     * function: 根据条件分页模糊查找系
     *
     * @param department
     * @return
     */
    List<Department> selectBatchByCondition(Department department);

    /**
     * author: WheelChen
     * date: 2017/11/3
     * function: 根据学院id删除班级表
     *
     * @param schoolId 学院id
     * @return
     */
    int deleteBatchBySchoolId(Integer schoolId);
}
